WIP: Implement orchestrion-based instrumentation for vercel-ai v6#21658
WIP: Implement orchestrion-based instrumentation for vercel-ai v6#21658mydea wants to merge 3 commits into
Conversation
9145703 to
abad3a9
Compare
3417464 to
d05d40e
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit d05d40e. Configure here.
| asyncLocalStorage: lookup.asyncLocalStorage, | ||
| getStoreWithActiveSpan: (span: Span) => api.trace.setSpan(api.context.active(), span as api.Span), | ||
| asyncLocalStorage, | ||
| getStoreWithActiveSpan: span => api.trace.setSpan(api.context.active(), span as api.Span), |
There was a problem hiding this comment.
Empty binding skips retry
Medium Severity
With skipOpenTelemetrySetup, getTracingChannelBinding can return a binding whose asyncLocalStorage is still undefined when the global OpenTelemetry context manager is not registered yet. waitForTracingChannelBinding treats any truthy binding as ready, so it runs channel subscribers immediately during Sentry.init() instead of retrying after the user registers their context manager.
Reviewed by Cursor Bugbot for commit d05d40e. Configure here.
| // If it still fails, we bail and do nothing | ||
| setTimeout(() => { | ||
| waitForTracingChannelBinding(callback, retries - 1); | ||
| }, 1); |
There was a problem hiding this comment.
Timer missing safeUnref call
Low Severity
waitForTracingChannelBinding schedules a setTimeout retry in @sentry/core without calling safeUnref (or unref), which can keep short-lived Node processes alive until the timer fires.
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit d05d40e. Configure here.
size-limit report 📦
|


WIP...
This is on top of #21613
When using orchestrion, this replaces the regular
vercelAiIntegrationwith the channel-variant. This today supports vercel ai v6 and v7 (v5/v4 support TBD).Test coverage exists and everything passes. This does not add any event processors etc. anymore, everything works inside of the integrations.
OTEL Spans emitted directly by vercel-ai v6 or below are ignored to avoid double instrumentation.